﻿using System;
using VisionCloud.Domain.Common;
using static VisionCloud.Core.Model.Ms.MsRobotLog;

namespace VisionCloud.Domain.DtoModel.Ms
{
    /// <summary>
    /// 查询条件对象
    /// </summary>
    public class MsRobotLogCondition : PageBase
    {
        public string DeviceId { get; set; }
        public string RobotId { get; set; }

        /// <summary>
        /// 日志等级
        /// </summary>
        public LogLevelEnum LogLevel { get; set; }

        public DateTime? Begin { get; set; }
        public DateTime? End { get; set; }
    }

    public class MsRobotLogViewModel
    {
        public Guid RobotLogId { get; set; }
        public string RobotId { get; set; }
        public string SubSystem { get; set; }
        public LogLevelEnum LogLevel { get; set; }
        public string LogLevelName => Enum.Parse(typeof(LogLevelEnum), LogLevel.ToString()).ToString();
        public string Message { get; set; }
        public DateTime? Time { get; set; }
    }

    public class MsRobotLogDto
    {
        public Guid RobotLogId { get; set; }
        public string RobotId { get; set; }
        public string SubSystem { get; set; }
        public LogLevelEnum LogLevel { get; set; }
        public string Message { get; set; }
        public DateTime? Time { get; set; }
    }
}